package wheelview.DataChoose;

import android.content.Context;

import com.concerneyes.R;

import java.util.List;

import wheelview.widget.adapters.AbstractWheelTextAdapter;

/**
 * Created by Administrator on 2017/7/14 0014.
 */

public class DataAdapter  extends AbstractWheelTextAdapter {
    public List<String> mList;
    private Context mContext;
    public DataAdapter(Context context, List<String> list) {
        super(context);
        mList=list;
        mContext=context;
    }

    public DataAdapter(Context context, List<String> list, int currentItem) {
        super(context, R.layout.item_birth_year, NO_RESOURCE, currentItem);
        this.mList = list;
        setItemTextResource(R.id.tempValue);
    }

    @Override
    protected String getItemText(int index) {
        String data=mList.get(index);
        return data;
    }

    @Override
    public int getItemsCount() {
        return mList.size();
    }
}
